﻿﻿@model BeanModel

@using Telerik.Web.Mvc.UI;

@Html.ValidationSummary(false)

@Html.HiddenFor(model => model.Id)
@Html.Telerik().TabStrip().Name("bean-edit").Items(x =>
{
    x.Add().Text("Bean General").Content(TabInfo().ToHtmlString()).Selected(true);

    //generate an event
    EngineContext.Current.Resolve<IEventPublisher>().Publish(new AdminTabStripCreated(x, "bean-edit"));
})
@helper TabInfo()
    { 
    <table class="adminContent">
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.Name):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.Name)
                @Html.ValidationMessageFor(model => model.Name)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.Description):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.Description)
                @Html.ValidationMessageFor(model => model.Description)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.Varietal):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.Varietal)
                @Html.ValidationMessageFor(model => model.Varietal)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.Elevation):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.Elevation)
                @Html.ValidationMessageFor(model => model.Elevation)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.ReceiptDate):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.ReceiptDate)
                @Html.ValidationMessageFor(model => model.ReceiptDate)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.ReceiptQuantity):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.ReceiptQuantity)
                @Html.ValidationMessageFor(model => model.ReceiptQuantity)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.CurrentInventory):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.CurrentInventory)
                @Html.ValidationMessageFor(model => model.CurrentInventory)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.IsActive):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.IsActive)
                @Html.ValidationMessageFor(model => model.IsActive)
            </td>
        </tr>
    </table>
    
}
